﻿using System.Linq;

namespace SharpGraphT.Sharp.Sharp.Util; 

public static class ArrayExtension {
    public static int GetHashCode(this object[] a) =>
        a == null
            ? 0
            : a.Aggregate(1,
                (current, element) => 31 * current +
                    (element == null ? 0 : element.GetHashCode()));
}